<?php
namespace app\validate;

use think\Validate;

class RecordCheck extends Validate
{
    protected $rule = [
        'token' => 'require',
        'user_id' => 'require',
        'version' => 'require',
        'lang' => 'require',

        'page'=>'require',
        'limit'=>'require',

        'delivery_id'=>'require',

        'quota_id'=>'require',
        'is_transport'=>'require',

        'after_sales_type'=>'require',
        'situation'=>'require',
        'ask'=>'require',
        'undertake_user_id'=>'require',

        'after_sales_id'=>'require',
        'handle_type'=>'require',
        'handle_content'=>'require',

    ];

    protected $message = [
        'token.require' => 'token不能为空',
        'user_id.require' => '用户id不能为空',
        'version.require' => '版本号不能为空',
        'lang.require' => '语言类型不能为空',

        'page.require' => '页码不能为空',
        'limit.require' => '分页条数不能为空',

        'delivery_id.require' => '发货id不能为空',

        'quota_id.require' => '报价id不能为空',
        'is_transport.require' => '运输模式不能为空',

        'after_sales_type.require' => '售后类型不能为空',
        'situation.require' => '情况说明不能为空',
        'ask.require' => '售后请求不能为空',
        'undertake_user_id.require' => '承接用户id不能为空',

        'after_sales_id.require' => '售后记录id不能为空',
        'handle_type.require' => '处理情况类型不能为空',
        'handle_content'=>'处理内容不能为空',

    ];

    protected $scene = [
        'delivery_record' => ['token', 'user_id', 'version', 'lang', 'page', 'limit'],
        'cancel_delivery' => ['token', 'user_id', 'version', 'lang', 'delivery_id'],
        'send_delivery' => ['token', 'user_id', 'version', 'lang', 'delivery_id', 'quota_id', 'is_transport'],

        'submit_after_sales' => ['token', 'user_id', 'version', 'lang', 'delivery_id', 'after_sales_type','undertake_user_id'],
        'undertake_user' => ['token', 'user_id', 'version', 'lang', 'delivery_id'],

        'handling_situation' => ['token', 'user_id', 'version', 'lang', 'after_sales_id'],
        'submit_Handle' => ['token', 'user_id', 'version', 'lang'],

        'complete_after_sales' => ['token', 'user_id', 'version', 'lang', 'after_sales_id'],

        'evaluate' => ['token', 'user_id', 'version', 'lang', 'delivery_id'],

    ];
}